const express = require('express')
const app = express()

app.use('/home', (req, res, next) => {
  console.log('home middleware 01')
  next()
})
app.use((req, res, next)=>{
  console.log('common middleware')
  next()
})
app.use('/home', (req, res, next) => {
  console.log('home middleware 02')
  res.end('hello home middleware')
  next()
})

app.listen(8000, () => {
  console.log('服务器启动成功')
})